package cn.zhf.shop.service.impl;

import cn.zhf.shop.entity.AccountDealTitle;
import cn.zhf.shop.entity.Audit;
import cn.zhf.shop.entity.Message;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import cn.zhf.shop.entity.AuditTitle;
import cn.zhf.shop.mapper.AuditTitleMapper;
import cn.zhf.shop.service.AuditTitleService;

import java.util.List;

@Service
public class AuditTitleServiceImpl implements AuditTitleService {

    @Resource
    private AuditTitleMapper auditTitleMapper;

    @Override
    public Message deleteByPrimaryKey(Integer auditTitleId) {
        return auditTitleMapper.deleteByPrimaryKey(auditTitleId) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public Message insert(AuditTitle record) {
        return auditTitleMapper.insert(record) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public Message insertSelective(AuditTitle record) {
        return auditTitleMapper.insertSelective(record) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public Message selectByPrimaryKey(Integer auditTitleId) {
        return Message.success(null).add(auditTitleMapper.selectByPrimaryKey(auditTitleId));
    }

    @Override
    public Message updateByPrimaryKeySelective(AuditTitle record) {
        return auditTitleMapper.updateByPrimaryKeySelective(record) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public Message updateByPrimaryKey(AuditTitle record) {
        return auditTitleMapper.updateByPrimaryKey(record) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public Message<List<Audit>> selectByAll() {
        return Message.success(null).add(auditTitleMapper.selectByAll());
    }

    @Override
    public Message<List<Audit>> selectByUpdateTime(String updateTime) {
        return Message.success(null).add(auditTitleMapper.selectByUpdateTime(updateTime));
    }

}


